package com.chixing.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author 马博
 * * @date 2021/10/18
 * 该接口提供了商品服务
 * 订单服务 --------http://productService/product/101 ----->商品服务
 *
 * FeignClient:
 * (1)远程服务调用(A服务 ===>B服务)
 * (2)负载均衡 loadBalance
 */
@FeignClient(name = "productService")
public interface ProductClient {
    @GetMapping("product/{proId}")
    public String getById(@PathVariable("proId") Integer proId);
}
